using System;
using DevZH.UI;
namespace testui
{
	public class MainWindow : Window
	{
		private MultilineEntry textControl;

		public MainWindow(string title = "DevZH.UI", int width = 300, int height = 200, bool hasMenubar = false)
			: base(title, width, height, hasMenubar)
		{
			InitializeComponent();
		}

		private void InitializeComponent()
		{
			var box = new VerticalBox();
			box.AllowPadding = true;

			textControl = new MultilineEntry();
			box.Children.Add(textControl, true);

			var button = new Button("Call .NET Core");
			box.Children.Add(button);

			button.Click += Button_Click;

			Child = box;
		}

		private void Button_Click(object sender, System.EventArgs e)
		{
			var bt = (Button)sender;
			textControl.Text = bt.Text;
			bt.Text = "2bcde";
		}
	}
}